package com.chuangke.regulation.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chuangke.regulation.dao.RgNkqxzyGwzzDao;
import com.chuangke.regulation.entity.RgNkqxzyGwzz;
import com.chuangke.regulation.service.RgNkqxzyGwzzService;

@Service
public class RgNkqxzyGwzzServiceImpl implements RgNkqxzyGwzzService {

    @Autowired
    private RgNkqxzyGwzzDao rgNkqxzyGwzzDao ;
    @Override
    public List<RgNkqxzyGwzz> findByPostName(String postName) {
        QueryWrapper<RgNkqxzyGwzz> qw = new QueryWrapper<>();
        qw.lambda().like(RgNkqxzyGwzz::getPostName, postName) ;

        return rgNkqxzyGwzzDao.list(qw) ;
    }

    @Override
    public List<RgNkqxzyGwzz> findByIds(List<String> ids) {
        if(ids.isEmpty()){
            return Arrays.asList() ;
        }
        return rgNkqxzyGwzzDao.listByIds(ids) ;
    }
}
